# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BackupDR.V1.Model.BackupApplianceLockInfo do
  @moduledoc """
  BackupApplianceLockInfo contains metadata about the backupappliance that created the lock.

  ## Attributes

  *   `backupApplianceId` (*type:* `String.t`, *default:* `nil`) - Required. The ID of the backup/recovery appliance that created this lock.
  *   `backupApplianceName` (*type:* `String.t`, *default:* `nil`) - Required. The name of the backup/recovery appliance that created this lock.
  *   `backupImage` (*type:* `String.t`, *default:* `nil`) - The image name that depends on this Backup.
  *   `jobName` (*type:* `String.t`, *default:* `nil`) - The job name on the backup/recovery appliance that created this lock.
  *   `lockReason` (*type:* `String.t`, *default:* `nil`) - Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The value of this string is only meaningful to the client and it is not interpreted by the BackupVault service.
  *   `slaId` (*type:* `String.t`, *default:* `nil`) - The SLA on the backup/recovery appliance that owns the lock.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :backupApplianceId => String.t() | nil,
          :backupApplianceName => String.t() | nil,
          :backupImage => String.t() | nil,
          :jobName => String.t() | nil,
          :lockReason => String.t() | nil,
          :slaId => String.t() | nil
        }

  field(:backupApplianceId)
  field(:backupApplianceName)
  field(:backupImage)
  field(:jobName)
  field(:lockReason)
  field(:slaId)
end

defimpl Poison.Decoder, for: GoogleApi.BackupDR.V1.Model.BackupApplianceLockInfo do
  def decode(value, options) do
    GoogleApi.BackupDR.V1.Model.BackupApplianceLockInfo.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BackupDR.V1.Model.BackupApplianceLockInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
